home *** CD-ROM | disk | FTP | other *** search
- %BEGIN Comments
-
- % Copyright (C) 1993 David John Burrowes
- % Distributed under terms of GNU General Public License.
- % See COPYING.text in Convert PICT's CommentedPSCode for a copy
-
- /rotateX 0 def
- /rotateY 0 def
- /DoingRotate false def
-
- %%%%%%%%%%%%%
- % Name: shortComment [00A0]
- % Syntax: num shortComment -
- % /name shortComment -
- % About: This processes a PICT short comment
- % Note: This ignores unknown comments.
- %%%%%%%%%%%%%
- /shortComment
- {
- /commentKind exch def
-
- commentKind /RotateEnd eq
- {
- DoingRotate true eq
- {
- restore
- /DoingRotate false def
- }
- if
- }
- {
- commentKind /DashedStop eq
- { [ ] 0 setdash }
- {
- commentKind /TextIsPostScript eq
- { /suppressText true def }
- {
- commentKind /TextEnd eq
- { /rotateText false def }
- if
- }
- ifelse
- }
- ifelse
- }
- ifelse
- }
- def
-
- %%%%%%%%%%%%%
- % Name: longComment [00A1]
- % Syntax: <string> num longComment -
- % args /name longComment
- % About: This processes a PICT long comment (a number indicating the
- % kind of comment, and a hex string of related data
- % Note: This ignores unknown comments.
- % See the end of the file for details about arguments.
- %%%%%%%%%%%%%
- /longComment
- {
- /commentKind exch def
-
- commentKind /RotateCenter eq
- {
- /thePoint exch def
- /rotateX thePoint 1 get def
- /rotateY thePoint 0 get def
- }
- {
- commentKind /RotateBegin eq
- {
- /rotateInfo exch def
- save
- /DoingRotate true def
- rotateInfo 2 get rotate
- }
- {
- commentKind /SetLineWidth eq
- {
- /lineWidth exch def
- /penWidth lineWidth def
- /penHeight lineWidth def
- }
- {
- commentKind /SetGrayLevel eq
- {
- %
- % Set the current foreground color to the shade of grey specified.
- %
- /greyvalue exch def
- /foregroundColor [ greyvalue greyvalue greyvalue ] def
- }
- {
- commentKind /DashedLine eq
- {
- /dashInfo exch def
- dashInfo 1 get dashInfo 0 get setdash
- }
- {
- commentKind /TextCenter eq
- {
- /rotateInfo exch def
- /textCenterX rotateInfo 1 get def
- /textCenterY rotateInfo 0 get def
- }
- {
- commentKind /TextBegin eq
- {
- /rotateText true def
- /rotateInfo exch def
- /textAngle rotateInfo 3 get def
- }
- {pop}
- ifelse
- }
- ifelse
- }
- ifelse
- }
- ifelse
- }
- ifelse
- }
- ifelse
- }
- ifelse
- }
- def
-
- %
- % Details about arguments to the various piccomments (passed to longcomment) (note,
- % parameters always bundled so there is just one argument.
- % If TextBegin or RotateBegin gets confused will write out as generic.
- % DashedLine an produced a mangled argument like [# # <ABCDEF>] # if it gets confused
- %
- % | means OR # means a number argument, #f means a float argument ? optional
- % ... means repeat last item some number of times
- %
- % Generally one will probably see generic arguments:
- % <ABCDEF12345> 143
- % But, the special ones are:
- % <ABCDEF41424344> /AppComment
- % [/tJustNone|/tJusLeft|/tJusCenter|/tJusRight|/tJusFull
- % /tFlipNone|/tFlipHorozontal|/tFlipVertical #degrees #fdegrees] /TextBegin
- % [#fy #fx] /TextCenter
- % [ #numchars #f%major-err-to-spaces #space-char
- % #f%interchar %funderline-width] /ClintLineLayout
- % [ ?/Close ?/Full ?/Frame] /PolySmooth
- % [ #offet [ #interval...] ] /DashedLine (see the PS manual about dashed lines)
- % # # div /SetLineWidth
- % (balanced-ps-info-would-go-here) /PostScriptHandle
- % (filename-would-go-here) /PostScriptFile
- % [ ABCD #id #index ] /ResourcePS (ABCD is some mac resource type)
- % #f /SetGrayLevel
- % [ #flip #angle #fangle ] /RotateBegin
- % [ #fy #fx ] /RotateCenter
- %
-
- %END Comments
-